Welcome![Sign In][Sign Up]
Location:
Search - AT Sample code

Search list

[Windows Develop如何编译Native API的示例代码

Description: 如何编译Native API的示例代码,有兴趣的朋友可以看一下-how compiler Native API sample code, interested friends can look at the
Platform: | Size: 41744 | Author: fan | Hits:

[Process-ThreadVBThreads_[2006-06-14_2308]

Description: === === === === === === === ==== Zarr s VB Website http://www.zarr.net/vb === === === === === === === ==== This sample piece of VB code has come from Zarr s VB Website at http://www.zarr.net/vb Zarr s VB Website is one of the Internet s number one resource for VB programmers of all abilities. Contained on the site are hundreds of good quality, sample VB projects and code to help you learn and improve your VB skills. All code from Zarr s VB Website may NOT be sold for any financial gain by any organisation, and none of the code/projects that are downloaded from the site may be used on any other website without the written permission from Zarr s VB Website. The Zarr VB Website is copyright (C)1998-2001 Zarr Internet Services Ltd. All rights reserved, all trademarks acknowledged.-=== === === === === === === === === === === === ==== === === Zarr s VB Website http : / / www.zarr.net / vb ======================= === === ===== This sample piece ========================= of VB code has come from VB Zarr s Website at http : / / www.zarr.net / vb Zarr s VB Website is one of th Internet e s number one resource for VB programm ers of all abilities. Contained on the site are h undreds of good quality, VB projects and sample code to help you learn and improve your VB skills. All code from VB We Zarr s bsite may NOT be sold for any financial gain by an y organization, and none of the code / projects that are download ed from the site may be used on any other website w ithout the written permission from Zarr s Web VB site
Platform: | Size: 24668 | Author: lch | Hits:

[GUI Developbrew window manager

Description:

 

Objective
This topic describes how to create a windowed application that will share the display with other applications.
Brew® MP windowed applications need to be written differently than traditional Brew MP applications. Traditional Brew MP applications, when running in the foreground, occupy full screen space and can modify the display at any time. In the windowing framework, multiple applications share the display at the same time and are not allowed to modify the display arbitrarily. A windowed application also needs to create one or more widgets to be used to create the windows.
A windowed application needs to:
·                  Create and initialize one or more widgets to be passed to IWindowMgr_CreateWindow().
The application can implement its own IWidget, or it can make use of an existing IWidget.
·                  Handle the EVT_APP_START_WINDOW event (and create a window).
·                  Implement handlers for visibility changes, focus changes, and extent changes. The implementation of these handlers is dependent on the details of the application.
·                  Draw in two stages:
·                                  Tell the container that drawing is necessary (ICONTAINER_Invalidate()).
·                                  Draw only when told to draw by the container (IWIDGET_Draw()).
Note: A windowed application should not call any functions that modify IDisplay directly. This includes explicit IDisplay function calls or implicit updates, such as calls to IIMAGE_Draw() or ICONTROL_Redraw(). Drawing should happen only on demand, for example, when IWIDGET_Draw() is called for the widget used to create the window. Existing Widget based applications follow these guidelines and, with minor modifications, can be ported to the windowing framework.
Event handling
A windowed application must respond to these events:
EVT_APP_START_WINDOW and EVT_APP_START
A window-based application receives EVT_APP_START_WINDOW first. If the application returns TRUE for this event, the application does not receive EVT_APP_START. If an application needs to support both the environments (window based and non-window based), it should handle both events.
When the application receives EVT_APP_START_WINDOW, it should create one or more windows.
If creation of IWindowMgr0 fails while handling EVT_APP_START_WINDOW, the application should assume that the platform does not support window-based applications. In this case, the application should return FALSE and continue the application logic in the code for EVT_APP_START.
EVT_APP_SUSPEND and EVT_APP_RESUME
After an application returns TRUE for EVT_APP_START_WINDOW, it will not receive EVT_APP_SUSPEND and EVT_APP_RESUME as non-windowed Brew MP applications do. Instead, the application must check for window status events that are sent to the widget through EVT_WDG_SETPROPERTY events. For EVT_WDG_SETPROPERTY events, wParam indicates which property was set, and dwParam specifies the value of the property. When the AEEWindowMgrExt_PROPEX_STATE property has a value of AEEWindowMgrExt_STATE_VISIBLE, the window is visible.
EVT_WDG_WINDOWSTATUS
The EVT_WDG_WINDOWSTATUS event is sent to a widget to notify it about various window related status messages. AEEWindowStatus.h contains information on the meaning of various status messages.
Sample code location

ZIP filename
Location
Run app
hellowindowapp
Brew MP Library
·                       Download and extract the ZIP file.
·                       Compile the app.
·                       Run it on the Brew MP Simulator.

Example of a windowed application
In the hellowindowapp sample, HelloWindowApp_HandleEvent handles the EVT_APP_START_WINDOW event and creates soft key and pop-up windows:
   case EVT_APP_START_WINDOW:   
      DBGPRINTF("EVT_APP_START_WINDOW");
 
      // Create the softkey and popup windows
      HelloWindowApp_CreateSoftkey(pMe);
      HelloWindowApp_CreateOrActivatePopup(pMe);
 
      // Handling this event tells Brew that we are a windowing
      // application.
      return TRUE;  
HelloWindowApp_CreateSoftkey() creates the soft key widget, sets the color text of the widget, then calls HelloWindowApp_CreateWindow() to create the window.
   WidgetWindow *pWindow = &pMe->softkeyWindow;
  
   if (pWindow->piWindowWidget != NULL) return;
   pWindow->pszDbgName = "Softkey";
   pWindow->pMe = pMe;
  
   (void) ISHELL_CreateInstance(pMe->applet.m_pIShell, AEECLSID_SoftkeyWidget,
            (void **) &pWindow->piWindowWidget);
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WidgetExtent extent = {0, HWA_SOFTKEY_HEIGHT};
      IWidget_SetExtent(pWindow->piWindowWidget, &extent);
   }
  
   (void) IWidget_SetBGColor(pWindow->piWindowWidget, MAKE_RGBA(200,200,200,255));
  
   // Now set the softkeys text
   {
      IWidget *piTextWidget = NULL;
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY1, &piTextWidget);
     
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Hover", TRUE);
      }
      RELEASEIF(piTextWidget);
 
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY2, &piTextWidget);
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Close", TRUE);
      }
      RELEASEIF(piTextWidget);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Softkey);  
HelloWindowApp_CreateWindow() creates the soft key window, as follows:
   int result;
   uint32 winId;
   AEEWindowProp propList[1];
  
   // Set custom window handler
   HANDLERDESC_Init(&pWindow->hdHandler, HelloWindowApp_WindowHandler, pWindow, NULL);
   IWIDGET_SetHandler(pWindow->piWindowWidget, &pWindow->hdHandler);
        
   propList[0].id = AEEWindowMgrExtProp_CLASS;
   propList[0].pbyLen = sizeof(winClass);
   propList[0].pby = (void *) &winClass;
     
   result = IWindowMgr_CreateWindow(pMe->piWindowMgr, (IQI*) (void *) pWindow->piWindowWidget,
      propList, ARR_SIZE(propList), &winId);
 
   if (result != SUCCESS) {
      DBGPRINTF("Window creation failed for %s: %d", pWindow->pszDbgName, result);
      HelloWindowApp_DestroyWindow(pWindow);
   } else {
      DBGPRINTF("Window %s created: id=%d", pWindow->pszDbgName, winId);
   }
HelloWindowApp_CreateOrActivatePopup() creates the widget for the pop-up window, then calls HelloWindowApp_CreateWindow() to create the pop-up window.
   pWindow->piWindowWidget = HelloWindowApp_CreateAndInitImageWidget(
                                pMe,
                                "popups.main" // Image as defined in appinfo.ini
                             );
 
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WExtent extent = {HWA_POPUP_WIDTH, HWA_POPUP_HEIGHT};
      IWIDGET_SetExtent(pWindow->piWindowWidget, &extent);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Popup);
Related information
·                  See Brew MP Widgets Technology Guide: Creating a Widgets application
·                  See Brew MP API Reference

Base version:
Brew MP 1.0
Tested version:
Brew MP 1.0
Phone tested:
No

 

Platform: | Size: 439828 | Author: bluecrest | Hits:

[Modem programDIAL..

Description: 用MODEM拔号的C语言源代码范例-dial-up modem using the C language source code examples
Platform: | Size: 10240 | Author: fq | Hits:

[SMSpduAndGprs

Description: 短信PDU的编码(代码)呵呵,短信发送分两种方式,一种是TEST,一种就是PDU,PDU是一种编码方式-SMS PDU encoding (code) Oh, messages sent at the two methods for a TEST. is a PDU, the PDU is a coding
Platform: | Size: 23552 | Author: 冯春 | Hits:

[Process-ThreadVBThreads_[2006-06-14_2308]

Description: === === === === === === === ==== Zarr s VB Website http://www.zarr.net/vb === === === === === === === ==== This sample piece of VB code has come from Zarr s VB Website at http://www.zarr.net/vb Zarr s VB Website is one of the Internet s number one resource for VB programmers of all abilities. Contained on the site are hundreds of good quality, sample VB projects and code to help you learn and improve your VB skills. All code from Zarr s VB Website may NOT be sold for any financial gain by any organisation, and none of the code/projects that are downloaded from the site may be used on any other website without the written permission from Zarr s VB Website. The Zarr VB Website is copyright (C)1998-2001 Zarr Internet Services Ltd. All rights reserved, all trademarks acknowledged.-=== === === === === === === === === === === === ==== === === Zarr s VB Website http :// www.zarr.net/vb ======================= === === ===== This sample piece ========================= of VB code has come from VB Zarr s Website at http :// www.zarr.net/vb Zarr s VB Website is one of th Internet e s number one resource for VB programm ers of all abilities. Contained on the site are h undreds of good quality, VB projects and sample code to help you learn and improve your VB skills. All code from VB We Zarr s bsite may NOT be sold for any financial gain by an y organization, and none of the code/projects that are download ed from the site may be used on any other website w ithout the written permission from Zarr s Web VB site
Platform: | Size: 24576 | Author: lch | Hits:

[Linux-UnixMagicARM-GPRS

Description: This MagicARM 2410 GPRS sample codes and BENQ M22 GPRS datasheet, the sample code inlcude GPRS dialup, GPRS SMS and GPRS Remote Control-This MagicARM 2410 sample codes and GPRS BENQ M22 GPRS datasheet, the sample code inlcude GPRS dialup. GPRS SMS and GPRS Remote Control
Platform: | Size: 3806208 | Author: | Hits:

[ARM-PowerPC-ColdFire-MIPSInterrupts

Description: arm的中断示例代码,推荐大家看看很不错的!◎-interruption arm sample code and recommended we look at very good! ◎
Platform: | Size: 3072 | Author: likefeng | Hits:

[Technology Managementlinux_pthread_program

Description: 该文档主要讲述本人在使用Linux线程编程时的学习心得,主要有设计到线程优先级和资源释放等问题,并附有测试代码示例。linhanzu@gmail.com-The document focuses on I-threaded programming in the use of Linux at the time of learning experiences, mainly in design to the thread priority and resources to the release of such issues, together with the test sample code. linhanzu@gmail.com
Platform: | Size: 342016 | Author: gomo | Hits:

[OpenGL programSample

Description: 一个OpenGL的编程简单例子,初学者看一看,c++平台上运行,有兴趣可以看看,主要实现画矩形和右击鼠标出现菜单,按 q 实现退出,代码只有几十行。 -OpenGL programming a simple example, take a look at the beginner, c++ Platforms are interested can see that the main draw rectangular and right-click mouse menu appears, press q to achieve withdrawal, code only a few dozen lines.
Platform: | Size: 2363392 | Author: huangwenjun | Hits:

[Embeded-SCM Developsample

Description: 非常好的汇编代码示例,可在linux平台用gas编译。学习at&t汇编语法的必备-Very good example of assembly code, you can use gas to compile linux platform. Learning at
Platform: | Size: 14336 | Author: kev | Hits:

[OtherPureBasicCode

Description: 利用春节七天在家里写的PureBasic示例代码.基本按照C教程的章节编排.适合入门学习使用.还请大家多多提出宝贵意见 Email:haihong5995037@163.com QQ:254082939-Use of the Spring Festival at home seven days a sample code written in PureBasic. Basically in accordance with sections C Tutorial presentation. Suitable for entry-learning to use. Also invited for their valuable views on many U.S. Email: haihong5995037@163.comQQ: 254082939
Platform: | Size: 29696 | Author: 耿海瑞 | Hits:

[.netDMCC_CSharp_TeleCommuter_Sample_Code

Description: Avaya DMCC .NET Samples. 一个CTI的应用系统。供参考。-Avaya DMCC. NET Samples. A CTI applications. For reference.
Platform: | Size: 55296 | Author: yi qizhi | Hits:

[Game EngineG5Engine

Description: G5游戏引擎示例代码 引擎底层使用DirectX9实现。 引擎的制作方向是使逻辑层的编码量最小化。 游戏中常用的计数和状态值在引擎中会自动维护,逻辑层在任何时刻都可以方便的取出这些信息。 (如:游戏开始后的帧计数) -G5 game engine sample code using DirectX9 realize the underlying engine. The direction of engine production is to make logic layer to minimize the amount of coding. Commonly used in the game count and status values in the engine will automatically maintain, logic layer can be at any time convenient to retrieve such information. (Eg: the game after the start of the frame count)
Platform: | Size: 17915904 | Author: 李慧鹏 | Hits:

[Multimedia DevelopG728(LD-CELP)

Description: G.728 is an ITU-T ADPCM speech codec standard covering the transmission of voice at rates of 16, 24, 32, and 40 kbit/s. It was introduced to supersede both G.721, which covered ADPCM at 32 kbit/s, and G.723, which described ADPCM for 24 and 40 kbit/s. G.726 also introduced a new 16 kbit/s rate. The four bit rates associated with G.726 are often referred to by the bit size of a sample, which are 2-bits, 3-bits, 4-bits, and 5-bits respectively.
Platform: | Size: 50176 | Author: chu | Hits:

[Multimedia Developjrtplib

Description: 该开发包内实现了rtp rtcp,是网络是流传的比较多的,但是没有实现RTSP,本人添加了rtps和两个缓冲区, 请大家看看,还有一个示例程序, 在本人的项目开发中用过的-The development kit to achieve the rtp rtcp, is the network is more spread, but did not realize RTSP, I added a buffer rtps and two, please look at the U.S., there is a sample procedure, in my project development in used
Platform: | Size: 3566592 | Author: liuyong | Hits:

[Windows DevelopOV7660-Code

Description:
Platform: | Size: 15360 | Author: Breeze | Hits:

[Windows DevelopWZCTOOL

Description: windows下wifi无线网卡控制接口wzctool,可以在ce和xp下使用,相信很多人都在找这个,那就赶紧下吧-wifi wireless card windows under the control interface wzctool, can use ce and xp, I believe a lot of people are looking at this,if that down soon!
Platform: | Size: 14336 | Author: jimslin | Hits:

[Windows DevelopBCB-OLE-EXCEL

Description: BCB中用OLE实现输出EXCEL文件的功能,是自己写的源码中的一部分,有需要的朋友只需看其中用到的属性和方法就可以了,希望对用到这个控件的朋友有帮助!-BCB using OLE to achieve output EXCEL files, source code is written in their own part, there is a need to only look at one of the friends of the properties and methods used can be, I hope to use this control to help a friend!
Platform: | Size: 8192 | Author: ouyangyajuan | Hits:

[Windows Developbgfg_codebook

Description: Example OpenCv // Background average sample code done with averages and done with codebooks // (adapted from the OpenCV book sample) // // NOTE: To get the keyboard to work, you *have* to have one of the video windows be active // and NOT the consule window. // // Gary Bradski Oct 3, 2008. // /* *************** License:************************** Oct. 3, 2008 Right to use this code in any way you want without warrenty, support or any guarentee of it working. BOOK: It would be nice if you cited it: Learning OpenCV: Computer Vision with the OpenCV Library by Gary Bradski and Adrian Kaehler Published by O Reilly Media, October 3, 2008 AVAILABLE AT: http://www.amazon.com/Learning-OpenCV-Computer-Vision-Library/dp/0596516134 Or: http://oreilly.com/catalog/9780596516130/ ISBN-10: 0596516134 or: ISBN-13: 978-0596516130 ************************************************** */-Example OpenCv // Background average sample code done with averages and done with codebooks // (adapted from the OpenCV book sample) // // NOTE: To get the keyboard to work, you*have* to have one of the video windows be active // and NOT the consule window. // // Gary Bradski Oct 3, 2008. // /**************** License:************************** Oct. 3, 2008 Right to use this code in any way you want without warrenty, support or any guarentee of it working. BOOK: It would be nice if you cited it: Learning OpenCV: Computer Vision with the OpenCV Library by Gary Bradski and Adrian Kaehler Published by O Reilly Media, October 3, 2008 AVAILABLE AT: http://www.amazon.com/Learning-OpenCV-Computer-Vision-Library/dp/0596516134 Or: http://oreilly.com/catalog/9780596516130/ ISBN-10: 0596516134 or: ISBN-13: 978-0596516130 ***************************************************/
Platform: | Size: 3072 | Author: Jason | Hits:
« 12 3 4 5 6 7 »

CodeBus www.codebus.net